package diskEntity

import "github.com/goravel/framework/database/orm"

type AttachmentCategory struct {
	orm.Model
	PID         *uint                 `json:"pid" gorm:"column:pid;null" form:"pid"` // 父级ID
	Name        string                `json:"name" gorm:"column:name" form:"name"`   // 分类名称
	Dir         string                `json:"dir" gorm:"column:dir" form:"dir"`      // 分类目录
	Attachments []Attachment          `json:"attachments" gorm:"foreignKey:attachment_category_id;references:ID" form:"attachments"`
	Children    []*AttachmentCategory `gorm:"foreignKey:pid;references:ID" form:"children" json:"children"`
	orm.SoftDeletes
}
